Communication apparatus and communication method

ABSTRACT

In an exemplary communication apparatus, an assignment module determines whether processing for a second packet assigned the flow ID associated with a received first packet is being executed. The assignment module determines a parallel processing module to execute processing for the first packet and a parameter to be included in a notice of assignment. The determined parallel processing module acquires a result of execution of the processing for the second packet from the computation table or the result of execution of the processing held in the parallel processing module according to the received notice of assignment. The determined parallel processing module executes the processing for the first packet using the result of execution of the processing for the second packet and the information included in the notice of assignment, and updates a computation table with a result of execution of the processing for the first packet.

CLAIM OF PRIORITY

The present application claims priority from Japanese patent applicationJP2012-124938 filed on May 31, 2012, the content of which is herebyincorporated by reference into this application.

BACKGROUND

This invention relates to a communication apparatus and, in particular,relates to a communication apparatus for processing packets.

The traffic volume in network systems is swelling because of prevalenceof digitalization of television contents or web video distributionservices in recent years. As a result, the demand for communicationlines having a capacity of over 100 Gbps is increasing.

The operating frequency of a logic device in a packet communicationapparatus is elevated with the increase in traffic volume; however, theoperating frequency of an FPGA (Field-Programmable Gate Array), which isan example of a logic device, is limited to about 300 MHz at most. Forthis reason, to install a 100-Gbps line with an FPGA, the FPGA isrequired to process packets in the order of 2 clks per packet.

To implement a packet management function such as a bandwidth controlfunction or a statistical counting function in a logic device, the logicdevice sorts the information on packets by flow to store it in aninformation storage medium (hereinafter, referred to as a table) and atevery arrival of a packet, updates a value in the table specific to theflow which is associated with the incoming packet.

For example, to perform the bandwidth control function, the logic devicemanages the bandwidth consumed by each flow in a table. Specifically,the logic device reads a bandwidth allocated to a flow (allocatedbandwidth) and a bandwidth consumed by the flow (consumed bandwidth)from the table (a. table RD) at every arrival of a packet, updates theconsumed bandwidth and compares the update result with the allocatedbandwidth (b. data computation), and writes the update result of theconsumed bandwidth to the table (c. table WR).

Hereinafter, updating the table with information about a packet, likethe foregoing a. to c., is referred to as table updating.

A common method of updating a table is that a logic device updates thetable on a packet-by-packet basis at every arrival of a packet(sequential processing method). In the sequential processing method, thelogic device usually takes a certain time (for example, about 10 clks)in the table updating for one packet.

In the field of this invention, there is a background art disclosed inJP 2000-358066 A. The method according to JP 2000-358066 A checks, foreach inbound packet, whether another packet from the same source ispending at an individual processing element, and if the result of thechecking is positive, forwards the inbound packet to the individualprocessing element. In other words, JP 2000-358066 A provides a parallelprocessing technique that a plurality of parallel processing modulesprocess packets of a plurality of flows.

SUMMARY

In a logic device employing a sequential processing method, if a packetarrival interval is longer than the time taken by table updating for onepacket, the logic device can perform table updating at every arrival ofa packet.

However, if the capacity of the communication line is increased and thepacket arrival interval is shorter than the time taken by table updatingfor one packet, a packet arrives before completion of table updating forthe previous packet. Accordingly, the logic device cannot perform tableupdating properly for continuously arriving packets.

The technique of JP 2000-358066 A distributes packets to a plurality ofparallel processing modules depending on the flow for each parallelprocessing module to perform table updating; accordingly, it is lessfrequent for one parallel processing module to successively receivepackets. However, if two packets of the same flow successively arrive atan interval shorter than the time required for table updating, thepackets of the same flow are forwarded to the same parallel processingmodule.

Hence, like in the aforementioned sequential processing method, thelogic device employing parallel processing modules may not be able toperform proper table updating for a plurality of successively arrivingpackets of the same flow. Since table updating for a packet of adifferent flow is not performed until the completion of table updatingfor the plurality of successively arriving packets of the same flow, aproblem arises that overall table updating for the packets might not beperformed properly.

In the meanwhile, each parallel processing module may have a tabledivided by flow to independently perform table updating for a flow.However, the number of flow IDs in a network system is not a fixedvalue; if flow-specific tables and parallel processing modules areinitially configured in a logic device, the expense for theconfiguration is elevated and the general versatility of the logicdevice is lost.

This invention has been achieved in view of these problems and aims toprovide, in processing packets arriving at an interval shorter than thetime required to update information held in an information storagemedium, a method of processing successively arriving packets even if theinformation on the same flow is required to be updated at every packetarrival, for example, by the statistical counting function.

An aspect of this invention is a communication apparatus connected witha network. The communication apparatus includes an input interface forreceiving packets sent from the network, a plurality of parallelprocessing modules for executing processing for the packets, a parallelprocessing assignment module for assigning the processing for thepackets to the parallel processing modules on a packet-by-packet basis,and a computation table including values indicating results of executionof the processing for the packets and flow IDs assigned to the packets.Each of the parallel processing module holds a result of execution ofprocessing for a packet performed by the parallel processing module. Theparallel processing assignment module holds a used flow management listincluding the flow IDs assigned to the packets for which the parallelprocessing modules execute processing and values indicating statuses ofthe processing for the packets in the parallel processing modules. Uponreceipt of a first packet, the parallel processing assignment moduledetermines whether processing for a second packet assigned the flow IDassociated with the first packet is being executed based on the usedflow management list and a flow ID assigned to the first packet. Theparallel processing assignment module determines a parallel processingmodule to execute processing for the first packet and a parameter to beincluded in a notice of assignment to be sent to the determined parallelprocessing module in accordance with the result of the determination.The parallel processing assignment module includes information about thefirst packet in the notice of assignment to send the notice ofassignment to the determined parallel processing module. The determinedparallel processing module acquires, upon receipt of the notice ofassignment, a result of execution of the processing for the secondpacket from either one of the computation table and the result ofexecution of the processing held in the parallel processing module inaccordance with the received notice of assignment. The determinedparallel processing module executes the processing for the first packetusing the acquired result of execution of the processing for the secondpacket and the information included in the notice of assignment. Thedetermined parallel processing module updates the computation table witha result of execution of the processing for the first packet.

According to an aspect of this invention, successively arriving packetscan be processed even if the packet arrival interval is shorter than thetime to update information in an information storage medium.

BRIEF DESCRIPTION OF THE DRAWINGS

The above and other objects, advantages and features of the presentinvention will be more apparent from the following description taken inconjunction with the accompanying drawings, in which:

FIG. 1A is an explanatory diagram illustrating table updating in thecase where the packet arrival interval is longer than the table updatetime length in Embodiment 1;

FIG. 1B is an explanatory diagram illustrating receiving packets in thecase where the packet arrival interval is shorter than the table updatetime length in Embodiment 1;

FIG. 2 is a block diagram illustrating a physical configuration of apacket communication apparatus in Embodiment 1 and a logic device in thepacket communication apparatus;

FIG. 3 is an explanatory diagram illustrating a format of a packet usedin communications in Embodiment 1;

FIG. 4 is an explanatory diagram illustrating a format of anin-apparatus header added to a packet in Embodiment 1;

FIG. 5 is a block diagram illustrating a logical configuration of anincoming packet controller in Embodiment 1;

FIG. 6 is an explanatory diagram illustrating a used flow managementlist in Embodiment 1;

FIG. 7 is an explanatory diagram illustrating a setting table inEmbodiment 1;

FIG. 8 is an explanatory diagram illustrating a computation table inEmbodiment 1;

FIG. 9 is a flowchart illustrating processing assignment performed by aparallel processing assignment module in Embodiment 1;

FIG. 10 is a flowchart illustrating used flow management performed bythe parallel processing assignment module in Embodiment 1;

FIG. 11 is a flowchart illustrating table updating performed by aparallel processing module in Embodiment 1;

FIG. 12 is a flowchart illustrating output determination performed by anoutput determination module in Embodiment 1;

FIG. 13A is an explanatory diagram illustrating computation results inthe case where a parallel processing module in Embodiment 1 successivelyperforms table updating;

FIG. 13B is an explanatory diagram illustrating computation results inthe case where two parallel processing modules in Embodiment 1 performtable updating;

FIG. 14 is a block diagram illustrating a physical configuration of apacket communication apparatus in Embodiment 2 and a logic device in thepacket communication apparatus;

FIG. 15 is a block diagram illustrating a logical configuration of anincoming packet controller in Embodiment 2;

FIG. 16 is an explanatory diagram illustrating a bandwidth setting tablein Embodiment 2;

FIG. 17 is an explanatory diagram illustrating a computation resultstorage table in Embodiment 2;

FIG. 18A is a flowchart illustrating calculation of the amount of tokenaccumulated before receipt of an incoming packet in table updatingperformed by a parallel processing module in Embodiment 2;

FIG. 18B is a flowchart illustrating determination whether the incomingpacket is under guarantee in the table updating performed by a parallelprocessing module in Embodiment 2;

FIG. 19 is a flowchart illustrating output determination performed by anoutput determination module in Embodiment 2;

FIG. 20 is an explanatory diagram illustrating transitions of theprevious packet arrival time and the stored token value caused by thetable updating in Embodiment 2;

FIG. 21 is a block diagram illustrating a physical configuration of apacket communication apparatus in Embodiment 3 and a logic device in thepacket communication apparatus;

FIG. 22 is a block diagram illustrating a logical configuration of anincoming packet controller in Embodiment 3;

FIG. 23 is an explanatory diagram illustrating a statistical informationtable in Embodiment 3;

FIG. 24 is a flowchart illustrating table updating performed by aparallel processing module in Embodiment 3; and

FIG. 25 is an explanatory diagram illustrating transitions of the numberof received packets and the number of received bytes caused by the tableupdating performed by the parallel processing module in Embodiment 3.

DETAILED DESCRIPTION OF THE EMBODIMENTS

Hereinafter, embodiments of this invention are described with referenceto the accompanying drawings.

Embodiment 1

Specific examples of relationships between the packet arrival intervaland the time required for table updating (table update time length) areexplained as follows.

FIG. 1A is an explanatory diagram illustrating table updating in thecase where the packet arrival interval is longer than the table updatetime length in Embodiment 1.

For example, if the packet arrival interval is 10 clks or more and thetable update time length is 10 clks or more, the packet communicationapparatus in this embodiment can perform table updating at every arrivalof a packet. This corresponds to a case where the packet arrivalinterval is 40 clks in 1-Gbps lines or 10 clks in 10-Gbps lines, and thetable update time length is 10 clks.

FIG. 1B is an explanatory diagram illustrating receiving packets in thecase where the packet arrival interval is shorter than the table updatetime length in Embodiment 1.

For example, if the packet arrival interval in a 100-Gbps line is 2 clksand the table update time length is 10 clks, the second packet arrivesat the packet communication apparatus before completion of tableupdating after arrival of the first packet. In this case, the secondpacket is discarded; accordingly, the table updating for the secondpacket is not performed.

Hereinafter, Embodiment 1 is described with reference to FIGS. 2 to 13.It should be noted that Embodiment 1 described hereinafter is one of theembodiments of this invention and is not to limit this invention.

The packet communication apparatus in this embodiment implements aparallel processing method explained hereinafter; upon arrival of apacket of a flow, the apparatus updates information on the flow in aninformation storage medium (table).

FIG. 2 is a block diagram illustrating a physical configuration of apacket communication apparatus 2 in Embodiment 1 and a logic device 210in the apparatus 2.

The packet communication apparatus 2 in this embodiment is an apparatusto transfer packets to other packet communication apparatuses. Thepacket communication apparatus 2 includes a plurality of networkinterface boards (NIFs) 200-1 to 200-M and a switch unit 206.

Each NIF 200 is an interface for receiving packets from a network andsending packets to the network. The switch unit 206 is connected withthe NIFs 200 and is a device for forwarding a packet received from anNIF 200 to a different NIF 200 to send the packet.

Each NIF 200 includes an input/output communication interface 201, a SWinterface 205, a logic device 210, and an NIF manager 211.

The input/output communication interface 201 is a communication port.The packet communication apparatus 2 connects to a different packetcommunication apparatus via the input/output communication interface 201and a network. The input/output communication interface 201 inEmbodiment 1 is a communication interface for Ethernet.

The SW interface 205 is a device to connect to the switch unit 206.

The NIF manager 211 is a processor such as a CPU. The NIF manager 211controls processing in the logic device 210.

The logic device 210 is a circuit for processing packets in thisembodiment. The logic device 210 includes at least one memory and atleast one computing device (such as a processor).

The logic device 210 includes processing modules such as an incomingheader processing module 202, an incoming packet controller 203, anoutgoing header processing module 207, and an outgoing packet controller208, and further includes a setting register 212. The memory included inthe logic device 210 holds a setting table 213, a computation table 214,an incoming packet buffer 204, and an outgoing packet buffer 209.

A packet received by the packet communication apparatus 2 is transferredto the input/output communication interface 201, the incoming headerprocessing module 202, the SW interface 205, the switch unit 206, the SWinterface 205, the incoming packet controller 203, the outgoing headerprocessing module 207, the outgoing packet controller 208, and theinput/output communication interface 201, in this order.

The processing modules included in the logic device 210 may beimplemented by a physical device such as an integrated circuit or by aprogram executed by at least one processor. Some of the processingmodules (for example, the incoming packet controller 203 and theincoming header processing module 202) may be implemented by one deviceor a program; one processing module may be implemented by a plurality ofdevices or programs.

The NIF manager 211 controls the setting register 212. The settingregister 212 has a storage area for transitorily storing data and holdsthe register values of the processing modules in the logic device 210.

FIG. 2 shows only the connection between the setting register 212 andthe incoming packet controller 203, but the setting register 212 isconnected with all the processing modules included in the logic device210 within the logic device 210. The following description omits theexplanation about the processing of the setting register 212 but all theprocessing modules in the logic device 210 performs their processingusing the setting register 212.

The input/output communication interface 201 adds a later-describedin-apparatus header 3 to the received packet 4.

FIG. 3 is an explanatory diagram illustrating a format of a packet 4used in communications in Embodiment 1.

The format of the packet 4 shown in FIG. 3 is merely an example and thepacket used in this embodiment may include any information. For example,the MAC addresses may be replaced by IP addresses.

The packet 4 includes a destination MAC address 401, a source MACaddress 402, a VLAN header 403, an Ethertype value 404, a payload 405,and a frame check sequence (FCS) 406.

In the destination MAC address 401 or the source MAC address 402, theMAC address of the packet communication apparatus 2 is set. In the VLANheader 403, a VLAN ID to be the identifier of the flow is set.

In an example, the payload 405 may include an MPLS header or a headeraccording to a different protocol and an MPLS label value or the likemay be set for the VLAN ID of the flow identifier. In the frame checksequence (FCS) 406, values to detect an error in the frame are set.

FIG. 4 is an explanatory drawing illustrating a format of anin-apparatus header 3 added to the packet 4 in Embodiment 1.

The input/output communication interface 201 adds an in-apparatus header3 to a received packet 4 to process the received packet 4 in the packetcommunication apparatus 2. The packet 4 including the added in-apparatusheader 3 and transmitted toward the switch unit 206 is referred to as anincoming packet in the following description.

The in-apparatus header 3 includes an output network interface boardidentifier (output NIF ID) 301, a flow ID 302, and a frame length 303.

The output NIF ID 301 is internal routing information. The internalrouting information in this embodiment is information indicating whichNIF 200 in the packet communication apparatus 2 should output, from theport thereof, the packet 4 received by the packet communicationapparatus 2. The switch unit 206 transfers the incoming packet sent tothe switch unit 206 to the SW interface 205 of the NIF 200 specified bythe internal routing information.

When adding an in-apparatus header 3 to a received packet 4, theinput/output communication interface 201 stores values such as nullvalues in the output NIF ID 301 and the flow ID 302. That is to say, theinput/output communication interface 201 does not determine the valuesto be stored in the output NIF ID 301 and the flow ID 302. Values forthe output NIF ID 301 and the flow ID 302 are stored by the incomingheader processing module 202.

The input/output communication interface 201 acquires the frame lengthof the received packet 4 and stores the acquired frame length in theframe length 303 in the in-apparatus header 3. Then, the input/outputcommunication interface 201 sends the packet 4 to the incoming headerprocessing module 202.

The incoming header processing module 202 identifies the flow of thepacket 4 with reference to the VLAN header 403 of the incoming packetreceived from the input/output communication interface 201. The incomingheader processing module 202 processes the VLAN tag based on theidentified flow and stores values in the output NIF ID 301 and the flowID 302 of the incoming packet.

The VLAN tag processing is transfer, convert, addition, or deletion ofthe VLAN tag. That is to say, the VLAN tag processing is to convert theVLAN header in the incoming packet into the VLAN header of the packetoutput from the packet communication apparatus 2.

In the VLAN tag processing, the incoming header processing module 202may overwrite the destination MAC address 401 and the source MAC address402 with the values assigned to the input/output communication interface201 or preregistered values specific to the flow.

After processing the VLAN tag and adding the output NIF ID 301 and theflow ID 302 to the in-apparatus header 3, the incoming header processingmodule 202 sends the incoming packet to the incoming packet controller203.

The incoming packet controller 203 stores the incoming packet receivedfrom the incoming header processing module 202 in the incoming packetbuffer 204. At this time, the incoming packet controller 203 performslater-described packet processing on the received incoming packet usingthe setting table 213 and the computation table 214.

After the packet processing, the incoming packet controller 203retrieves the incoming packet held in the incoming packet buffer 204 andsends it to the SW interface 205. The SW interface 205 transfers thereceived incoming packet to the switch unit 206.

Upon receipt of the incoming packet from the SW interface 205 in an NIF200, the switch unit 206 identifies the destination NIF 200 to transferthe received incoming packet with reference to the output NIF ID 301 inthe received incoming packet. Next, the switch unit 206 transfers thereceived incoming packet as an outgoing packet to the SW interface 205associated with the identified NIF 200.

In this embodiment, the packet 4 transmitted from the switch unit 206toward the input/output communication interface 201 is referred to as anoutgoing packet.

The SW interface 205 transfers the received outgoing packet to theoutgoing header processing module 207.

In the forgoing description, the incoming header processing module 202converts the header (format) of the incoming packet into a header(format) of the packet to be output from the packet communicationapparatus 2. Instead of the incoming header processing module 202,however, the outgoing header processing module 207 in this embodimentmay perform this conversion into the header of the outgoing packet.

If the header conversion (format conversion) has already been performedby the incoming header processing module 202, the outgoing headerprocessing module 207 transfers the outgoing packet received from the SWinterface 205 to the outgoing packet controller 208 as it is.

In the forgoing description, the incoming packet controller 203 performsthe packet processing. Instead of the incoming packet controller 203,however, the outgoing packet controller 208 may store the outgoingpacket in the outgoing packet buffer 209 and further, may perform thepacket processing.

In the case where the outgoing packet controller 208 performs packetprocessing, the outgoing packet controller 208 retrieves the outgoingpacket held in the outgoing packet buffer 209 after processing thepacket. Then, it forwards the retrieved outgoing packet to theinput/output communication interface 201.

In the case where the outgoing packet controller 208 does not performthe packet processing, the outgoing packet controller 208 transfers theoutgoing packet received from the outgoing header processing module 207to the input/output communication interface 201 as it is.

The input/output communication interface 201 removes the in-apparatusheader 3 from the received outgoing packet. Then, the input/outputcommunication interface 201 transfers the outgoing packet to a differentapparatus in the format of the packet 4 shown in FIG. 3.

FIG. 5 is a block diagram illustrating a logical configuration of theincoming packet controller 203 in Embodiment 1.

The incoming packet controller 203 includes a parallel processingassignment module 501, a used flow management list 502, a plurality ofparallel processing modules 503 (503-1 to 503-N), an outputdetermination module 504, and an access coordination module 505.

The parallel processing assignment module 501 is a processing module forperforming later-described processing assignment S950 when the incomingpacket controller 203 receives an incoming packet from the incomingheader processing module 202. In the processing assignment S950, theparallel processing assignment module 501 identifies the flow based onthe flow ID 302 in the in-apparatus header 3 of the incoming packet andrefers to the used flow management list 502 to determine the parallelprocessing module 503 to perform the table updating for the incomingpacket from the parallel processing modules 503-1 to 503-N.

The parallel processing assignment module 501 holds the used flowmanagement list 502 in a memory included in the logic device 210 orother device. The parallel processing assignment module 501 updates theused flow management list 502 in the later-described processingassignment S950 and used flow management S1050. Furthermore, theparallel processing assignment module 501 stores a received incomingpacket in the incoming packet buffer 204 upon receipt of it.

The used flow management list 502 indicates flow IDs of incoming packetsprocessed by individual parallel processing modules 503 and the statusesof the processing by the individual parallel processing modules 503.

Each parallel processing module 503 updates information on a flowincluded in the computation table 214 in later-described table updatingS1150. The parallel processing module 503 sends a determination of theprocessing of table updating S1150 to the output determination module504. The incoming packet controller 203 includes N units of parallelprocessing modules 503 (where N is any natural number).

In this embodiment, the table update time length required for tableupdating S1150 by the parallel processing module 503 is predetermined.The incoming packet buffer 204 (or the outgoing packet buffer 209) inthis embodiment is used as a shift register by the parallel processingassignment module 501 and the output determination module 504.

Furthermore, the number N of the parallel processing modules 503 isdetermined based on the table update time length and the shortest packetarrival interval. The shortest packet arrival interval is a valuepredetermined depending on the communication line connected from thepacket communication apparatus 2.

For example, if the table update time length is 10 clks and the shortestpacket arrival interval is 2 clks, the result of dividing the tableupdate time length by the shortest packet arrival interval (and roundingup the remainder) is 5. Accordingly, the number N of parallel processingmodules 503 is predetermined to be 5.

The output determination module 504 performs later-described outputdetermination S1250 and receives a notice of completion of thecomputation and a determination of the processing from the parallelprocessing module 503 (one of 503-1 to 503-N). The output determinationmodule 504 retrieves an incoming packet from the incoming packet buffer204 and converts the header or payload of the retrieved incoming packetbased on the determination of the processing. Thereafter, the outputdetermination module 504 sends the incoming packet to the SW interface205.

The access coordination module 505 coordinates the accesses (retrievalsand write-backs) of the parallel processing modules 503-1 to 503-N tothe setting table 213 and the computation table 214. Although thefollowing description omits the details of the processing of the accesscoordination module 505, when the parallel processing modules 503 aregoing to access the setting table 213 or the computation table 214, theaccess coordination module 505 coordinates the accesses.

FIG. 6 is an explanatory diagram illustrating the used flow managementlist 502 in Embodiment 1.

The used flow management list 502 includes columns of parallelprocessing modules 601, flow IDs 602, and processing status counters603.

The column of parallel processing modules 601 includes identifiersuniquely representing the parallel processing modules 503-1 to 503-N.The parallel processing modules 601 in this embodiment indicate valuesfor identifying the parallel processing modules 503 by numerical values.The values stored in the parallel processing modules 601 arepredetermined, for example, by the administrator.

The column of flow IDs 602 includes flow IDs uniquely representing theflows assigned to the incoming packets processed by the parallelprocessing modules 503. The values stored in the flow IDs 602 areupdated by the parallel processing assignment module 501. The valuesstored in the flow IDs 602 correspond to the values in the flow IDs 302of in-apparatus headers 3 stored by the incoming header processingmodule 202.

The column of processing status counters 603 includes values indicatingthe statuses of table updating by the parallel processing modules 503.The processing status counters 603 in this embodiment indicate values ofthe processing time passed since the start of the table updating.

Each processing status counter 603 in the following descriptionindicates the remaining time until the completion of the table updatingby means of a subtraction counter. Specifically, when table updating isstarted, the table update time length is stored in the processing statuscounter 603. The parallel processing assignment module 501 subtracts aunit time (1 clk in this embodiment) from the value in the processingstatus counter 603 at every unit time.

An entry holding “0” in the processing status counter 603 indicates thatthe parallel processing module 503 identified by the parallel processingmodule 601 has completed table updating. An entry holding a positivevalue other than “0” in the processing status counter 603 indicates thatthe parallel processing module 503 identified by the parallel processingmodule 601 is processing table updating.

The following description is about processing assuming that theprocessing status counter 603 is a subtraction counter, but theprocessing status counter 603 may indicate a time passed since the startof the table updating. In this case, the parallel processing assignmentmodule 501 may determine the status of table updating by comparing theprocessing status counter 603 with the predetermined table update timelength.

FIG. 7 is an explanatory diagram illustrating the setting table 213 inEmbodiment 1.

The values stored in the setting table 213 are setting values to be usedin table updating by the parallel processing modules 503; they arepredetermined, for example, by the administrator. The setting table 213includes columns of flow IDs 701 and setting information 702.

The column of flow IDs 701 includes flow IDs uniquely representing theflows assigned to incoming packets. The values stored in the flow IDs701 correspond to the values in the flow IDs 302 of in-apparatus headers3 stored by the incoming header processing module 202.

The setting information 702 indicates information used in tableupdating. Specifically, the setting information 702 represents settingvalues to be used to update a computation result in table updating by aparallel processing module 503.

FIG. 8 is an explanatory diagram illustrating the computation table 214in Embodiment 1.

The computation table 214 includes columns of flow IDs 801 andcomputation results 802.

The column of flow IDs 801 includes flow IDs uniquely representing theflows assigned to incoming packets. The values stored in the flow IDs801 correspond to the values in the flow IDs 302 of in-apparatus headers3 stored by the incoming header processing module 202.

Each computation result 802 indicates a result of flow-specific packetprocessing, namely, a result of table updating for the flow. The valuestored in the computation result 802 is updated in table updating by theparallel processing module 503.

Described hereinafter is processing assignment 5950 performed by theparallel processing assignment module 501.

FIG. 9 is a flowchart illustrating processing assignment S950 performedby the parallel processing assignment module 501 in Embodiment 1.

Upon receipt of an incoming packet from the incoming header processingmodule 202 (S900), the parallel processing assignment module 501acquires values of the flow ID 302 and the frame length 303 from thein-apparatus header 3 included in the received incoming packet (S901).

After S901, the parallel processing assignment module 501 refers to theused flow management list 502 to determine whether the value in theprocessing status counter 603 in each entry is different from “0”(S902).

If it is determined at 5902 that the processing status counter values inall entries of the used flow management list 502 are different from “0”,all the parallel processing modules 503 are performing table updating.Accordingly, the parallel processing assignment module 501 discards theincoming packet (S903) and terminates the processing assignment S950shown in FIG. 9 (S909).

If, at 5902, the used flow management list 502 includes some entrycontaining a non-zero value in the processing status counter 603, atleast one parallel processing module 503 of all the parallel processingmodules 503 is not performing table updating. Hence, the parallelprocessing assignment module 501 determines whether the value of theflow ID 302 acquired at 5901 matches the value of the flow ID 602 of theentry containing the value different from 0 in the processing statuscounter 603 (S904).

In this connection, the parallel processing assignment module 501 maydetermine at 5904 that the acquired value of the flow ID 302 matches thevalue of the flow ID 602 of the entry containing a value different from0 in the processing status counter 603 if a value corresponding to thevalue of the flow ID 302 acquired at 5901 matches the value of the flowID 602 of the entry containing the value different from 0 in theprocessing status counter 603.

If it is determined at S904 that the value of the flow ID 302 acquiredat S901 does not match the value of the flow ID 602 of the entrycontaining a value different from 0 in the processing status counter603, the parallel processing assignment module 501 performs 5907 so thata parallel processing module that is not performing table updating is tonewly perform table updating for the incoming packet.

If it is determined at S904 that the value of the flow ID 302 acquiredat S901 matches the value of the flow ID 602 of the entry containing avalue different from 0 in the processing status counter 603, theparallel processing module 503 handling the flow of the incoming packetcan successively perform table updating for the incoming packet.Accordingly, the parallel processing assignment module 501 determinesthat the parallel processing module 503 identified by the parallelprocessing module 601 of the entry including the flow ID 602 matchingthe acquired flow ID 302 is to successively perform table updating forthe incoming packet.

The parallel processing assignment module 501 then updates theprocessing status counter 603 of the entry including the flow ID 602matching the acquired value of the flow ID 302 with a value indicatingthe table update time length (S905). For example, if the table updatetime length is 10 clks, the parallel processing assignment module 501updates the processing status counter 603 of the entry including theflow ID 602 matching the acquired value of the flow ID 302 with “10”.

By updating the processing status counter 603 at S905, the parallelprocessing assignment module 501 can store a value indicating whetherthe parallel processing module 503 has completed table updating in theprocessing status counter 603.

After S905, the parallel processing assignment module 501 issues anotice of assignment including a processing start trigger, anew/successive parameter, the acquired flow ID, and the acquired framelength to the parallel processing module 503 identified by the parallelprocessing module 601 of the entry in the used flow management list 502including the value of the flow ID 602 matching the acquired value ofthe flow ID 302 (S906).

At S906, the parallel processing assignment module 501 determines thenew/successive parameter to be a value indicating successive processing(“successive”) and includes the new/successive parameter indicating“successive” (a value 1 in this embodiment) in the notice of assignment.The new/successive parameter in this embodiment is a value for notifyingthe parallel processing module 503 of which type of table updating is tobe performed.

After S906, the parallel processing assignment module 501 terminates theprocessing assignment S950 shown in FIG. 9 (S909).

If it is determined at S904 that the value of the flow ID 302 acquiredat S901 does not match the value of the flow ID 602 of the entrycontaining a value different from 0 in the processing status counter603, the parallel processing assignment module 501 refers to the usedflow management list 502 to extract the entry containing a value of thesmallest number in the parallel processing module 601 from the entriescontaining “0” in the processing status counter 603. The parallelprocessing assignment module 501 determines that the parallel processingmodule 503 identified by the parallel processing module 601 of theextracted entry is to newly perform table updating for the incomingpacket.

The parallel processing assignment module 501 updates the flow ID 602 ofthe extracted entry with the value of the flow ID 302 acquired at 5901.The parallel processing assignment module 501 updates the processingstatus counter 603 of the extracted entry with the table update timelength (S907).

At the foregoing S907, the parallel processing assignment module 501extracts, in the used flow management list 502, the entry containing avalue of the smallest number in the parallel processing module 601 fromthe entries containing “0” in the processing status counter 603;however, the parallel processing assignment module 501 can extract anentry in accordance with any policy as far as the extracted entry is oneof the entries containing “0” in the processing status counter 603 inthe used flow management list 502. For example, the parallel processingassignment module 501 may extract the entry containing the greatestnumber or the entry selected in accordance with the order predeterminedby the administrator.

After S907, the parallel processing assignment module 501 issues anotice of assignment including a processing start trigger, anew/successive parameter, the flow ID, and the frame length to thedetermined parallel processing module 503 (S908). At S908, the parallelprocessing assignment module 501 determines the new/successive parameterto be a value indicating new processing (“new”) and includes thenew/successive parameter indicating “new” (a value 0 in this embodiment)in the notice of assignment.

The processing start trigger included in the notice of assignment issuedat S906 and S908 is a value indicating start of table updating. The flowID included in the notice of assignment is the flow ID acquired at S901,namely, the flow ID of the incoming packet. The frame length included inthe notice of assignment is the frame length acquired at S901, namely,the frame length of the incoming packet.

After S908, the parallel processing assignment module 501 terminates theprocessing assignment S950 shown in FIG. 9 (S909).

Described hereinafter is used flow management S1050 performed by theparallel processing assignment module 501.

FIG. 10 is a flowchart illustrating the used flow management S1050performed by the parallel processing assignment module 501 in Embodiment1.

The parallel processing assignment module 501 determines, at every clock(S1000), whether the processing status counter 603 in each entry of theused flow management list 502 indicates “0” (S1001).

If it is determined that the processing status counters 603 of allentries in the used flow management list 502 indicate “0” at S1001, theparallel processing assignment module 501 terminates the used flowmanagement S1050 (S1003).

If it is determined at S1001 that the used flow management list 502includes some entry containing a non-zero value in the processing statuscounter 603, the parallel processing assignment module 501 subtracts 1from each non-zero value included in the processing status counter 603(S1002). After S1002, the parallel processing assignment module 501terminates the used flow management S1050 (S1003).

Described hereinafter is table updating S1150 performed by one of theparallel processing modules 503-1 to 503-N.

FIG. 11 is a flowchart illustrating the table updating S1150 performedby the parallel processing module 503 in Embodiment 1.

Upon receipt of a notice of assignment including a processing starttrigger from the parallel processing assignment module 501 (S1100), theparallel processing module 503 acquires the new/successive parameter,the flow ID, and the frame length included in the received notice ofassignment (S1101).

After S1101, the parallel processing module 503 determines whether thenew/successive parameter is “0”, namely, whether the new/successiveparameter indicates “new” (S1102).

If the new/successive parameter is “0”, meaning if it is determined thatthe new/successive parameter indicates “new” at S1102, the parallelprocessing module 503 searches the setting table 213 with a search keyof the flow ID acquired at S1101, namely, the flow ID of the incomingpacket. As a result of the search, the parallel processing module 503acquires the value of the setting information 702 of the entry in thesetting table 213 containing the flow ID of the incoming packet in theflow ID 701 (S1103). Through this processing, the parallel processingmodule 503 acquires the value of the setting information 702 for theincoming packet.

After S1103, the parallel processing module 503 searches the computationtable 214 with a search key of the flow ID of the incoming packet. As aresult of the search, the parallel processing module 503 acquires thevalue of the computation result 802 of the entry in the computationtable 214 containing the flow ID of the incoming packet in the flow ID801 (S1104). After S1104, the parallel processing module 503 performsthe processing at S1107.

If, at S1102, the new/successive parameter is not “0”, meaning if it isdetermined that the new/successive parameter indicates “successive”, theparallel processing module 503, like at S1103, searches the settingtable 213 with a search key of the flow ID of the incoming packet toacquire the value of the setting information 702 for the incoming packet(S1105).

After S1105, the parallel processing module 503 acquires the previouscomputation result internally held by the parallel processing module 503for successive processing (S1106). The previous computation resultinternally held for successive processing is a computation result thatthe parallel processing module 503 stores in a memory in the logicdevice 210, such as the setting register 212, to successively performnext table updating before completion of table updating.

Through S1106 in which the parallel processing module 503 acquires theinternally held previous computation result, the parallel processingmodule 503 can perform table updating based on the latest computationresult without accessing the computation table 214. Even if the parallelprocessing module 503 continuously receives incoming packets of the sameflow, table updating can be performed properly.

After S1106, the parallel processing module 503 proceeds to S1107.

In the processing from S1102 to S1106 in FIG. 11, the parallelprocessing module 503 only acquires information for data computation intable updating; however, the parallel processing module 503 inEmbodiment 1 may perform processing differently depending on the valueof the new/successive parameter. For example, if the new/successiveparameter indicates “new”, the parallel processing module 503 may add avalue predetermined by the user to the value of the setting information702 acquired from the setting table 213, after S1104.

This approach allows the computation result to be updated with a valuedifferent depending on whether incoming packets arrive successively ornot, as requested by the user.

After S1104 or S1106, the parallel processing module 503 updates thecomputation result acquired at S1104 or S1106 using the frame lengthincluded in the received notice of assignment and the settinginformation 702 acquired from the setting table 213 (S1107).

The method of updating the computation result at S1107 is predetermined,for example, by the administrator. An example of the method of updatingthe computation result adds the frame length included in the receivednotice of assignment to the computation result to update the computationresult.

At S1107, the parallel processing module 503 compares the updatedcomputation result with a threshold held in the setting information 702to determine the processing on the incoming packet (such as convertingthe value included in the header of the incoming packet) based on theresult of the comparison. It acquires the determined processing as adetermination of the processing.

After S1107, the parallel processing module 503 writes back the updatedcomputation result to the computation result 802 of the entry in thecomputation table 214 containing the flow ID of the incoming packet inthe flow ID 801.

Furthermore, the parallel processing module 503 internally holds theupdated computation result as a previous computation result (S1108) forthe case where the next notice of assignment indicates successive packetprocessing (for successive processing of the next packet). Specifically,the parallel processing module 503 stores the updated computation resultin a memory included in the logic device 210, such as the settingregister 212.

The previous computation result internally held at S1108 allows theparallel processing module 503 to speedily pass over the computationresult to the next table updating to be performed upon receipt of thenext incoming packet.

After S1108, the parallel processing module 503 sends a notice ofcompletion of computation including values indicating the completion ofthe computation and the determination of the processing acquired atS1107 to the output determination module 504 (S1109). After S1109, theparallel processing module 503 terminates the table updating S1150(S1110).

Described hereinafter is output determination S1250 performed by theoutput determination module 504.

FIG. 12 is a flowchart illustrating the output determination S1250performed by the output determination module 504 in Embodiment 1.

The output determination module 504 receives a notice of completion ofcomputation from one of the parallel processing modules 503-1 to 503-N(S1200).

After S1200, the output determination module 504 converts the value ofthe VLAN header 403 or payload 405 in the incoming packet retrieved fromthe incoming packet buffer 204 in accordance with the determination ofthe processing acquired from the received notice of completion ofcomputation. Thereafter, it sends the incoming packet including thevalue of the converted VLAN header 403 or payload 405 to the SWinterface 205 (S1201).

After S1201, the output determination module 504 terminates the outputdetermination S1250 (S1202).

Through the processing shown in FIG. 12, the output determination module504 can perform processing, such as header conversion, in accordancewith the result of table updating in the parallel processing module 503,on an incoming packet.

FIGS. 13A and 13B illustrate two examples of transitions of computationresults caused by the table updating S1150 shown in FIG. 11.

FIG. 13A is an explanatory diagram illustrating computation results inthe case where the parallel processing module 503-1 in Embodiment 1successively performs the table updating S1150.

Assuming that the table update time length is 10 clks and the shortestpacket arrival interval is 2 clks, FIGS. 13A and 13B illustrate examplesthat the parallel processing module 503-1 successively receives incomingpackets of the same flow ID “100” at 2-elk intervals.

In this embodiment, the incoming packet first received by the parallelprocessing assignment module 501 is referred to as the first packet; theincoming packet received 2 clks later than the first packet is referredto as the second packet; and the incoming packet received 2 clks laterthan the second packet is referred to as the third packet. In FIG. 13A,the values of the flow IDs 302 of the first packet, the second packet,and the third packet are all “100”.

In FIGS. 13A and 13B, the setting information 702-1 is the value of thesetting information 702 of the entry in the setting table 213 containing“100” in the flow ID 701 and the computation result 802-1 is the valueof the computation result 802 of the entry in the computation table 214containing “100” in the flow ID 801. The previous computation result1302-1 is the previous computation result internally held by theparallel processing module 503-1.

The first packet is an incoming packet on which the parallel processingassignment module 501 has determined at 5904 that the parallelprocessing module 503-1 is to newly perform table updating.

When the parallel processing module 503-1 in Embodiment 1 receives anotice of assignment including a new/successive parameter indicating“new”, the flow ID of the first packet, the frame length of the firstpacket, and a processing start trigger from the parallel processingassignment module 501 (T1311), the parallel processing module 503-1starts searching the setting table 213 and the computation table 214with a search key of the flow ID “100” of the first packet. As a resultof the search, the parallel processing module 503-1 acquires settinginformation X1 and a computation result A1 (table RD).

The table RD for the first packet corresponds to S1100 to S1104 in FIG.11.

The parallel processing module 503-1 updates the computation result A1into a computation result B1 using the setting information X1 and theframe length of the first packet (data computation). The datacomputation for the first packet corresponds to S1107 in FIG. 11.

When the data computation for the first packet is completed (T1314), theparallel processing module 503-1 starts writing back the computationresult B1 to the computation table 214 (table WR). The table WR for thefirst packet corresponds to S1108.

In general, accessing a table requires some time; accordingly, the writeback of the computation result B1 to the computation table 214 ends atT1316. In the table WR, the parallel processing module 503-1 furtherholds the computation result B1 internally as a previous computationresult 1302-1 for successive processing of the next incoming packet(which corresponds to S1108 in FIG. 11).

The second packet is received by the parallel processing assignmentmodule 501 before completion of the table updating for the first packet.Accordingly, the second packet is an incoming packet on which theparallel processing assignment module 501 has determined at S904 thatthe parallel processing module 503-1 is to successively perform thetable updating.

When the parallel processing module 503-1 receives a notice ofassignment including a new/successive parameter indicating “successive”,the flow ID of the second packet, the frame length of the second packet,and a processing start trigger from the parallel processing assignmentmodule 501 (T1312), the parallel processing module 503-1 startssearching the setting table 213 with a search key of the flow ID “100”of the second packet. As a result of the search, the parallel processingmodule 503-1 acquires setting information X1 (dummy RD).

The dummy RD for the second packet corresponds to S1100 to S1102, andS1105.

Since, at T1312, the update of computation result in the table updatingfor the first packet has not been completed yet, the computation result802-1 is still the computation result A1. For this reason, the parallelprocessing module 503-1 does not acquire the computation result from thecomputation table 214 in the table updating for the second packet.

The parallel processing module 503-1 starts dummy RD upon receipt of anotice of assignment including a new/successive parameter indicating“successive”. As to the table processing in this embodiment, acquiringonly setting information from the setting table 213 without referring tothe computation table 214 is referred to as dummy RD.

After the dummy RD, the parallel processing module 503-1 retrieves theprevious computation result 1302-1 internally held in the tablecomputation for the first packet to take over the computation result B1obtained in the previous table updating (T1314). The takeover of thecomputation result B1 internally held in the table computation for thefirst packet corresponds to S1106 in FIG. 11.

The parallel processing module 503-1 updates the taken over computationresult B1 into a computation result C1 using the setting information X1and the frame length of the second packet (data computation). The datacomputation for the second packet corresponds to S1107 in FIG. 11.

When the data computation for the second packet is completed at T1315,the parallel processing module 503-1 starts writing back the computationresult C1 to the computation table 214 (table WR). The table WR for thesecond packet corresponds to S1108 in FIG. 11.

Since accessing a table requires some time, the writing back thecomputation result C1 to the computation table 214 ends at T1318. In thetable WR, the parallel processing module 503-1 further holds thecomputation result C1 internally as a previous computation result 1302-1for successive processing of the next incoming packet.

Just as the second packet is a packet received before the completion ofthe table updating for the first packet, the third packet is a packetreceived by the parallel processing assignment module 501 beforecompletion of the table updating for the second packet. For this reason,the table updating for the third packet is the same as the tableupdating for the second packet.

However, the setting information 702-1 in FIG. 13A is updated by theadministrator between T1312 and T1313 when the table updating for thethird packet is started. Specifically, the value stored in the settinginformation 702-1 is updated from the setting information X1 to thesetting information Y1. Accordingly, the setting information 702-1acquired in the dummy RD starting at T1313 by the parallel processingmodule 503-1 is the setting information Y1.

In the table WR starting at T1317, the parallel processing module 503-1holds a computation result D1 as the previous computation result 1302-1.After T1319 when the table updating for the third packet ends, thecomputation result 802-1 holds the computation result D1.

In the foregoing processing, the previous computation result 1302-1after T1314 holds the computation result B1; accordingly, the parallelprocessing module 503-1 can pass over the computation result B1 to thedata computation in the table updating for the second packet. Since theprevious computation result 1302-1 after T1315 holds the computationresult C1, the parallel processing module 503-1 can pass over thecomputation result C1 to the data computation in table updating for thethird packet.

FIG. 13B is an explanatory diagram illustrating computation results inthe case where two parallel processing modules 503 in Embodiment 1perform the table updating S1150.

FIG. 13B is an explanatory diagram illustrating transitions of thecomputation result in the case where two parallel processing modules503-1 and 503-2 perform the table updating S1150. When the parallelprocessing assignment module 501 receives incoming packets of differentflows, the computation results shown in FIG. 13B are obtained.

In FIG. 13B, the parallel processing assignment module 501 consecutivelyreceives a first packet of the flow ID “100”, a second packet of theflow ID “200”, and a third packet of the flow ID “100”. The settinginformation 702 of the entry in the setting table 213 containing “200”in the flow ID 701 is referred to as setting information 702-2. Thecomputation result 802 of the entry in the computation table 214containing “200” in the flow ID 801 is referred to as a computationresult 802-2. The previous computation result 1302-2 is the previouscomputation result held by the parallel processing module 503-2.

The parallel processing module 503-1 performs table updating for thefirst packet in FIG. 13B in the same way as the table updating for thefirst packet in FIG. 13A.

The second packet in FIG. 13B has a flow ID different from that of thefirst packet. Accordingly, the parallel processing assignment module 501sends a notice of assignment including a new/successive parameterindicating “new”, the flow ID “200”, the flow length of the secondpacket, and a processing start trigger to the parallel processing module503-2.

The parallel processing module 503-2 performs table updating for thesecond packet like the table updating for the first packet by theparallel processing module 503-1. The parallel processing module 503-2starts the table updating for the second packet at T1312 and ends thetable updating for the second packet by T1318.

At T1312, the parallel processing module 503-2 acquires settinginformation 702-2 (setting information X2) from the setting table 213.The parallel processing module 503-2 further acquires a computationresult 802-2 (computation result A2) from the computation table 214 atT1312. The parallel processing module 503-2 updates the computationresult A2 with a computation result B2 in the table updating for thesecond packet.

While the parallel processing module 503-1 is writing back thecomputation result B1 to the computation table 214, the parallelprocessing module 503-2 writes back the computation result B2 to thecomputation table 214 (T1315). This is because the flow IDs aredifferent between the first packet and the second packet and theinformation on the first packet and the information on the second packetare held in different entries in both of the setting table 213 and thecomputation table 214. Both of the parallel processing modules 503-1 and503-2 can simultaneously write back computation results to thecomputation table 214.

The third packet has the same flow ID as the first packet and isreceived by the parallel processing assignment module 501 beforecompletion of the table updating for the first packet. The parallelprocessing assignment module 501 determines that the parallel processingmodule 503-1 which performs the table updating for the first packet isto successively perform the table updating for the third packet.

The table updating for the third packet by the parallel processingmodule 503-1 is the same as the table updating for the third packetillustrated in FIG. 13A. However, the parallel processing module 503-1acquires the computation result B1 from the previous computation result1302-1 and updates the computation result B1 with a computation resultC1.

Since the shortest packet arrival intervals in this embodiment are all 2clks, data computation in successive packet processing by parallelprocessing modules should be completed within 2 clks. The parallelprocessing assignment module 501 in this embodiment keeps a time lengthrequired for data computation and if it receives an incoming packet at atime interval shorter than the time length required for the datacomputation, it may discard the subsequently received incoming packet.

According to Embodiment 1 described above, the packet communicationapparatus 2 performs data computation for consecutively arrivingincoming packets using previous computation results held by the parallelprocessing modules 503. Hence, the parallel processing modules 503 inEmbodiment 1 do not need to access the computation table 214 at everytable updating and can perform table updating successively.

Furthermore, the less access to the computation table 214 can save thepower consumption in the packet communication apparatus.

Embodiment 1 allows more complex table updating because table updatingfor incoming packets utilizes the setting table 213 and conversion ofthe incoming packets is performed at the output determination module504.

Embodiment 2

Hereinafter, Embodiment 2 is described with reference to FIGS. 14 to 20.

Although the packet communication apparatus 2 in Embodiment 1 performsgeneral table updating for incoming packets, the packet communicationapparatus in Embodiment 2 performs bandwidth control based on incomingpackets. To perform the bandwidth control function, the packetcommunication apparatus in Embodiment 2 employs a token bucketalgorithm.

In using the token bucket algorithm, the packet communication apparatusadds tokens to a token bucket (a predetermined area provided in amemory) at a rate corresponding to the allocated bandwidth. If the tokenbucket holds accumulated tokens corresponding to the frame length of apacket to be sent, the packet communication apparatus determines thatthe packet is under guarantee of bandwidth; then the packetcommunication apparatus sends the packet having the frame length andremoves the tokens corresponding to the frame length from the tokenbucket. If the token bucket does not hold enough tokens corresponding tothe frame length of a packet to be sent, the packet communicationapparatus determines that the packet is out of guarantee of bandwidthand sends the packet having the frame length. The apparatus keeps thetokens and does not remove the tokens corresponding to the frame lengthfrom the token bucket.

FIG. 14 is a block diagram illustrating a physical configuration of thepacket communication apparatus 22 in Embodiment 2 and a logic device2210 in the apparatus 22.

The packet communication apparatus 22 in Embodiment 2 has the samephysical configuration as that of the packet communication apparatus 2in Embodiment 1 shown in FIG. 2. Specifically, the packet communicationapparatus 22 includes a plurality of network interface boards (NIFs)200-1 to 200-M and a switch unit 206 like the packet communicationapparatus 2 shown in FIG. 2. Each NIF 200 in Embodiment 2 also includesan input/output communication interface 201, a SW interface 205, and anNIF manager 211 like the NIF 200 in Embodiment 1.

However, the NIF 200 in Embodiment 2 includes a logic device 2210instead of the logic device 210 in Embodiment 1. The difference betweenthe logic device 2210 and the logic device 210 is that the memory in thelogic device 2210 holds a bandwidth setting table 2213 and a computationresult storage table 2214.

The incoming packet controller 2203 in the logic device 2210 performsprocessing differently from the incoming packet controller 203 in thelogic device 210 in Embodiment 1.

The setting register 2212 in the logic device 2210 has a storage areafor transitorily storing data and is connected with all the processingmodules in the logic device 2210, like the setting register 212 inEmbodiment 1. However, the setting register 2212 stores data differentfrom the data stored by the setting register 212 because of theprocessing of the incoming packet controller 2203. The followingdescription omits explanation of the processing of the setting register2212.

The incoming header processing module 202, the incoming packet buffer204, the outgoing header processing module 207, the outgoing packetcontroller 208, and the outgoing packet buffer 209 in Embodiment 2 arethe same as the incoming header processing module 202, the incomingpacket buffer 204, the outgoing header processing module 207, theoutgoing packet controller 208, and the outgoing packet buffer 209 inEmbodiment 1.

The bandwidth setting table 2213 corresponds to the setting table 213 inEmbodiment 1 and stores setting values to be used in table updatingperformed in the incoming packet controller 2203. The computation resultstorage table 2214 corresponds to the computation table 214 inEmbodiment 1 and stores the results of table updating performed in theincoming packet controller 2203. Embodiment 2 is an embodiment in thecase where the data stored in the setting table 213 and the computationtable 214 is different from that in Embodiment 1.

When the incoming packet controller 2203 receives an incoming packetfrom the incoming header processing module 202, it stores the incomingpacket in the incoming packet buffer 204. At this time, the incomingpacket controller 2203 processes the packet, namely performs bandwidthcontrol, using the bandwidth setting table 2213 and the computationresult storage table 2214. After the bandwidth control, the incomingpacket controller 2203 retrieves the packet stored in the incomingpacket buffer 204 to send it to the SW interface 205.

FIG. 15 is a block diagram illustrating a logical configuration of theincoming packet controller 2203 in Embodiment 2.

The incoming packet controller 2203 has the same configuration as thatof the incoming packet controller 203 shown in FIG. 5. The differencebetween the incoming packet controller 2203 and the incoming packetcontroller 203 in Embodiment 1 is that the incoming packet controller2203 includes a plurality of parallel processing modules 2503 (parallelprocessing modules 2503-1 to 2503-N), an output determination module2504, and an access coordination module 2505. The parallel processingmodules 2503, output determination module 2504, and access coordinationmodule 2505 perform processing differently from the parallel processingmodules 503, output determination module 504, and access coordinationmodule 505.

The used flow management list 502 in Embodiment 2 is also different fromthe used flow management list 502 in Embodiment 1 in the point that theparallel processing modules 601 in the used flow management list 502represent the parallel processing modules 2503-1 to 2503-N.

The parallel processing assignment module 501 in Embodiment 2 performsthe same processing assignment 5950 that the parallel processingassignment module 501 in Embodiment 1 does.

Each parallel processing module 2503 performs later-described tableupdating S1850 and updates information on a flow included in thecomputation result storage table 2214. The parallel processing module2503 sends a determination of processing (“under guarantee” or “out ofguarantee”) to the output determination module 2504.

Like in Embodiment 1, the time required for table updating S1850 by theparallel processing module 2503 is predetermined in Embodiment 2.Furthermore, the incoming packet buffer 204 is used as a shift registerby the parallel processing assignment module 501 and the outputdetermination module 2504. Still like in Embodiment 1, the number N ofthe parallel processing modules 2503 is predetermined based on the tableupdate time length and the shortest packet arrival interval.

The output determination module 2504 performs later-described outputdetermination S1950 and receives a notice of completion of computationand a determination of processing (“under guarantee” or “out ofguarantee”) from each parallel processing module 2503. The outputdetermination module 2504 converts the header of an incoming packetreceived from the incoming packet buffer 204 and sends the incomingpacket with the converted header to the SW interface 205.

The access coordination module 2505 coordinates the accesses (retrievalsand write-backs) from the parallel processing modules 2503 to thebandwidth setting table 2213 and the computation result storage table2214, like the access coordination module 505 in Embodiment 1.

FIG. 16 is an explanatory diagram illustrating the bandwidth settingtable 2213 in Embodiment 2.

The values stored in the bandwidth setting table 2213 are setting valuesfor the parallel processing module 2503 to execute the token algorithm;they are predetermined, for example, by the administrator. The bandwidthsetting table 2213 includes columns of flow IDs 2701, periodically addedtoken values 2702, and depths of token buckets 2703.

The column of flow IDs 2701 includes identifiers uniquely representingthe flows assigned to incoming packets. The values stored in the flowIDs 2701 correspond to the values in the flow IDs 302 of in-apparatusheaders 3 stored by the incoming header processing module 202.

Each periodically added token value 2702 indicates the amount of tokento be added to a token bucket per unit time (corresponding to theguaranteed bandwidth reserved per unit time).

Each depth of token bucket 2703 indicates a maximum amount of token thetoken bucket can contain.

FIG. 17 is an explanatory diagram illustrating the computation resultstorage table 2214 in Embodiment 2.

The computation result storage table 2214 is a table used to determinewhether the packet can be sent in a guaranteed bandwidth. Thecomputation result storage table 2214 includes columns of flow IDs 2801,previous packet arrival times 2802, and stored token values 2803.

A flow ID 2801 includes a flow ID uniquely representing a flow assignedto each incoming packet. The value stored in the flow ID 2801corresponds to the value in the flow ID 302 of an in-apparatus header 3stored by the incoming header processing module 202.

A previous packet arrival time 2802 indicates the time of execution ofprevious table updating by a parallel processing module 2503. A storedtoken value 2803 indicates the amount of token accumulated in the tokenbucket that was calculated in the previous table updating. That is tosay, the previous packet arrival time 2802 indicates the time ofcalculation of the value stored in the stored token value 2803.

With reference to FIGS. 18A and 18B, described is table updating S1850performed by the parallel processing module 2503.

FIG. 18A is a flowchart illustrating calculation of the amount of tokenaccumulated before receiving an incoming packet in the table updatingS1850 performed by the parallel processing module 2503 in Embodiment 2.

Upon receipt of a notice of assignment including a processing starttrigger from the parallel processing assignment module 501 (S1800), theparallel processing module 2503 acquires the new/successive parameter,the flow ID, and the frame length included in the notice of assignment(S1801).

After S1801, the parallel processing module 2503 determines whether thenew/successive parameter is “0”, namely, whether the new/successiveparameter indicates “new” (S1802).

If the new/successive parameter is “0”, meaning if it is determined thatthe new/successive parameter indicates “new” at S1802, the parallelprocessing module 2503 searches the bandwidth setting table 2213 with asearch key of the flow ID acquired at S1801, namely, the flow ID of theincoming packet. As a result of the search, the parallel processingmodule 2503 acquires the value of the periodically added token value2702 and the depth of token bucket 2703 of the entry in the bandwidthsetting table 2213 containing the flow ID of the incoming packet in theflow ID 2701 (S1803).

In this connection, the parallel processing module 2503 holds the timeof the search of the bandwidth setting table 2213 at S1803 in the memoryof the logic device 2210.

After S1803, the parallel processing module 2503 searches thecomputation result storage table 2214 with a search key of the flow IDof the incoming packet. As a result of the search, the parallelprocessing module 2503 acquires the values of the previous packetarrival time 2802 and the stored token value 2803 of the entry in thecomputation result storage table 2214 containing the flow ID of theincoming packet in the flow ID 2801 (S1804).

After S1804, the parallel processing module 2503 internally holds thetime of the search of the bandwidth setting table 2213 at S1803 as aprevious table update time for successive processing of the nextincoming packet (S1805).

After S1805, the parallel processing module 2503 calculates thedifference between the time of the search of the bandwidth setting table2213 internally held at S1803 and the previous packet arrival time 2802acquired at S1804 to obtain a packet arrival interval. The parallelprocessing module 2503 multiplies the obtained packet arrival intervalby the periodically added token value 2702 acquired at S1803 to obtainthe amount of token to be added (S1806).

After S1806, the parallel processing module 2503 adds the amount oftoken to be added obtained at S1806 to the stored token value 2803acquired at S1804 (S1807). After S1807, the parallel processing module2503 proceeds to S1813 shown in FIG. 18B.

If, at S1802, the new/successive parameter is not “0”, meaning if it isdetermined that the new/successive parameter indicates “successive”, theparallel processing module 2503 performs the same processing as S1803(S1808). Through S1808, the parallel processing module 2503 acquires thevalues of the periodically added token value 2702 and the depth of tokenbucket 2703 for the incoming packet.

Furthermore, the parallel processing module 2503 holds the time of thesearch of the bandwidth setting table 2213 at S1808 in the memory of thelogic device 2210.

After S1808, the parallel processing module 2503 acquires the previoustable update time internally held for successive processing as theprevious packet arrival time (S1809).

After S1809, the parallel processing module 2503 performs the sameprocessing as S1805 (S1810). Specifically, at S1810, the parallelprocessing module 2503 internally holds the time of the search of thebandwidth setting table 2213 at S1808 as a previous table update timefor successive processing of the next incoming packet.

After S1810, the parallel processing module 2503 calculates thedifference between the previous packet arrival time acquired at S1809and the time of the search of the bandwidth setting table 2213 held atS1808 to obtain a packet arrival interval. The parallel processingmodule 2503 multiplies the obtained packet arrival interval by theperiodically added token value 2702 acquired at S1808 to obtain theamount of token to be added (S1811).

After S1811, the parallel processing module 2503 acquires the previousstored token value internally held for successive processing and addsthe amount of token to be added obtained at S1811 to the acquiredprevious stored token value (S1812) and proceeds to S1813. The previousstored token value acquired at S1812 is the value held at S1822 in FIG.18B.

The result of addition at S1807 or S1812 is the amount of tokenaccumulated in the token bucket before the receipt of the incomingpacket.

In addition to the processing of S1802 to S1812, the parallel processingmodule 2503 in Embodiment 2 may perform processing differently dependingon the value of the new/successive parameter. For example, if thenew/successive parameter indicates “new”, the parallel processing module2503 may add a value predetermined by the user to the value of theresult of the addition at S1807.

This approach allows the computation result to be updated with a valuedifferent depending on whether incoming packets arrive successively ornot, as requested by the user.

FIG. 18B is a flowchart illustrating determination whether an incomingpacket is under guarantee of bandwidth in the table updating S1850performed by the parallel processing module 2503 in Embodiment 2.

After S1807 or S1812, the parallel processing module 2503 determineswhether the result of the addition at S1807 or S1812 exceeds the valueof the depth of token bucket 2703 acquired at S1803 or S1808 (S1813).

If it is determined at S1813 that the result of the addition at S1807 orS1812 is equal to or smaller than the value of the depth of token bucket2703, the parallel processing module 2503 holds the result of theaddition at S1807 or S1812 as the current amount of token (S1814). AfterS1814, the parallel processing module 2503 proceeds to S1816.

Alternatively, if it is determined at S1813 that the result of theaddition at S1807 or S1812 exceeds the value of the depth of tokenbucket 2703, the parallel processing module 2503 holds the value of thedepth of token bucket 2703 as the current amount of token (S1815). AfterS1815, the parallel processing module 2503 proceeds to S1816.

After S1814 or S1815, the parallel processing module 2503 determineswhether the amount of token corresponding to the frame length of theincoming packet acquired at S1801 is equal to or less the current amountof token stored at S1814 or S1815 (S1816).

If it is determined at S1816 that the amount of token corresponding tothe frame length of the incoming packet acquired at S1801 is equal to orless than the current amount of token, the parallel processing module2503 calculates a token value after removing the amount of tokencorresponding to the frame length of the incoming packet from thecurrent amount of token to obtain an updated stored token value (S1817).The updated stored token value indicates the amount of token left in thetoken bucket after sending the incoming packet.

After S1817, the parallel processing module 2503 creates a determinationof processing indicating that the result of bandwidth control is “underguarantee” and sends the created determination of processing to theoutput determination module 2504 (S1818). After S1818, the parallelprocessing module 2503 proceeds to S1821.

If it is determined at S1816 that the amount of token corresponding tothe frame length of the incoming packet acquired at S1801 exceeds thecurrent amount of token, the parallel processing module 2503 holds thesame value as the current amount of token as the updated stored tokenvalue (S1819).

After S1819, the parallel processing module 2503 creates a noticeindicating that the result of bandwidth control is “out of guarantee”and sends the created notice to the output determination module 2504(S1820). After S1820, the parallel processing module 2503 proceeds toS1821.

It should be noted that the parallel processing module 2503 may create adetermination of processing indicating that the result of bandwidthcontrol is “under guarantee” or “out of guarantee” at S1818 or S1820 andsends the created determination of processing and a notice indicatingthe completion of computation to the output determination module 504 atlater-described S1823.

By sending or creating the result of bandwidth control at S1818 orS1820, the parallel processing module 2503 can make the incoming packetprocessed in accordance with the result of the bandwidth control.

After S1818 or S1820, the parallel processing module 2503 updates theprevious packet arrival time 2802 in the computation result storagetable 2214 with the time of search of the bandwidth setting table 2213held at S1803 or S1808. The parallel processing module 2503 writes backthe updated stored token value to the stored token value 2803 in thecomputation result storage table 2214 (S1821).

After S1821, the parallel processing module 2503 internally holds theupdated stored token value as a previous stored token value forsuccessive processing of the next incoming packet (S1822).

After S1822, the parallel processing module 2503 creates a noticeincluding the flow ID of the incoming packet and indicating completionof computation and sends the created notice to the output determinationmodule 2504 (S1823). After S1823, it terminates the processingillustrated in FIGS. 18A and 18B (S1824).

Described hereinafter is output determination S1950 performed by theoutput determination module 2504.

FIG. 19 is a flowchart illustrating the output determination S1950performed by the output determination module 2504 in Embodiment 2.

Upon receipt of a notice indicating completion of computation from theparallel processing module 2503 (S1900), the output determination module2504 retrieves the incoming packet indicated by the received notice.Then, the output determination module 2504 identifies the determinationof processing (under guarantee or out of guarantee) sent by the parallelprocessing module 2503, which is the same parallel processing module2503 that has sent the notice indicating the completion of computation.

The output determination module 2504 updates a CoS value and othervalues included in the retrieved incoming packet in accordance with thedetermination of processing identified by the notice (S1901). The outputdetermination module 2504 sends the incoming packet with the updated CoSvalue and other values to the SW interface 205.

After S1901, the output determination module 2504 terminates the outputdetermination S1950 (S1902).

FIG. 20 is an explanatory diagram illustrating transitions of theprevious packet arrival time and the stored token value caused by thetable updating S1850 in Embodiment 2.

Assuming that the table update time length is 10 clks and the shortestpacket arrival interval is 2 clks, FIG. 20 illustrates an example thatthe parallel processing module 2503-1 successively receives incomingpackets of the same flow ID “100”. In FIG. 20, the frame lengths of thefirst packet, the second packet, and the third packet are 80.

Like the first packet in Embodiment 1, the first packet in Embodiment 2is an incoming packet on which the parallel processing assignment module501 has determined at S904 that the parallel processing module 2503-1 isto newly perform table updating.

When the parallel processing module 2503-1 in Embodiment 2 receives anotice of assignment including a new/successive parameter indicating“new”, the flow ID of the first packet, and a processing start triggerfrom the parallel processing assignment module 501 (T2011), the parallelprocessing module 2503-1 starts searching the bandwidth setting table2213 and the computation result storage table 2214 with a search key ofthe flow ID “100” of the first packet. As a result of the search, theparallel processing module 2503-1 acquires a periodically added tokenvalue, a depth of token bucket, a previous packet arrival time, and astored token value (table RD).

The table RD for the first packet corresponds to S1800 to S1805 in FIG.18A.

Meanwhile, in the table RD for the first packet, the parallel processingmodule 2503-1 internally holds the time of the search of the bandwidthsetting table 2213 as a previous table update time 2002 for successiveprocessing of the next incoming packet. This corresponds to S1805. Inthe table RD for the first packet shown in FIG. 20, the time of thesearch of the bandwidth setting table 2213 is “2020”.

As a result of the search of the bandwidth setting table 2213 and thecomputation result storage table 2214 in the table RD for the firstpacket shown in FIG. 20, the parallel processing module 2503-1 acquiresa value “10” for the periodically added token value 2702, a value “1000”for the depth of token bucket 2703, a value “2000” for the previouspacket arrival time 2802, and a value “100” for the stored token value2803. The value of the previous table update time 2002 internally heldby the parallel processing module 2503-1 in the table RD for the firstpacket is “2020”.

After the table RD for the first packet, the parallel processing module2503-1 calculates the stored token value 2803 using the value “2020” ofthe time of search of the bandwidth setting table 2213, the value “10”of the periodically added token value 2702, the value “1000” of thedepth of token bucket 2703, the value “2000” of the previous packetarrival time 2802, and the value “100” of the stored token value 2803 toobtain a value “220” (data computation). Here, the stored token value isobtained by calculating {(2020−2000)×10+100−80=220}.

Meanwhile, in the data computation for the first packet, the parallelprocessing module 2503 acquires the time of search of the bandwidthsetting table 2213 as the previous packet arrival time. That is to say,the previous packet arrival time acquired in data computation and theprevious table update time 2002 in table RD are the same value.

The foregoing data computation for the first packet corresponds toS1806, S1807, S1813, S1814, and S1816 to S1818 in FIGS. 18A and 18B.

When the data computation for the first packet is completed (T2014), theparallel processing module 2503-1 starts writing back the acquired value“2020” of the previous packet arrival time and the calculated value“220” of the stored token value to the previous packet arrival time 2802and the stored token value 2803 in the computation result storage table2214 (table WR). The table WR for the first packet corresponds to S1821in FIG. 18B.

Since updating the computation result storage table 2214 requires acertain time, the acquired value “2020” of the previous packet arrivaltime 2802 and the calculated value “220” of the stored token value 2803are reflected to the computation result storage table 2214 at T2016.

Meanwhile, in the table WR for the first packet, the parallel processingmodule 2503-1 internally holds the calculated value “220” of the storedtoken value as a previous stored token value 2003 for successiveprocessing of the next incoming packet. This corresponds to S1822 inFIG. 18.

The second packet is received by the parallel processing assignmentmodule 501 before completion of the table updating for the first packet.Accordingly, the second packet is an incoming packet on which theparallel processing assignment module 501 has determined at S904 thatthe parallel processing module 2503-1 is to successively perform tableupdating.

When the parallel processing module 2503-1 receives a notice ofassignment including a new/successive parameter indicating “successive”,the flow ID of the second packet, and a processing start trigger fromthe parallel processing assignment module 501 (T2012), the parallelprocessing module 2503-1 starts searching the bandwidth setting table2213 with a search key of the flow ID of the second packet.

As a result of the search, the parallel processing module 2503-1acquires a value “10” for the periodically added token value 2702 and avalue “1000” for the depth of token bucket 2703 (dummy RD). This dummyRD for the second packet corresponds to S1800 to S1802, and S1808.

Since the second packet is received before completion of the tableupdating for the first packet, the parallel processing module 2503-1does not access the computation result storage table 2214 in the dummyRD for the second packet. The dummy RD in Embodiment 2 only refers tothe bandwidth setting table 2213 and does not acquire values from thecomputation result storage table 2214.

Meanwhile, in the dummy RD for the second packet, the parallelprocessing module 2503-1 acquires the value “2020” of the previousupdate time 2002 internally held in the table updating for the firstpacket as the previous packet arrival time. This corresponds to S1809.

Furthermore, in the dummy RD for the second packet, the parallelprocessing module 2503-1 internally holds the value “2022” of the timeof the foregoing search of the bandwidth setting table 2213 as aprevious table update time 2002 for successive processing of the nextincoming packet. This corresponds to S1810.

In the dummy RD for the second packet, the parallel processing module2503-1 calculates the amount of token to be added using the value “2022”of the time of search of the bandwidth setting table 2213, the value“10” of the periodically added token value 2702, and the value “2020” ofthe previous packet arrival time 2802 (data computation) before passingover the previous stored token value, which will be described below. Thedata computation for the second packet corresponds to S1811 in FIG. 18A.Here, the amount of token to be added is obtained by (2022−2020)×10=20.

The parallel processing module 2503-1 takes over the value “220” of theprevious stored token value 2003 internally held in the table updatingfor the first packet to the table updating for the second packet in thedata computation for the second packet. This corresponds to S1812 inFIG. 18A.

Then, in the data computation for the second packet, the parallelprocessing module 2503-1 calculates the updated previous table updatetime and the updated stored token value. This corresponds to S1812 inFIG. 18A, S1813, S1814, and S1816 to S1818 in FIG. 18B. The updatedstored token value calculated in this processing is obtained by20+220−80=160.

When the data computation for the second packet is completed at T2015,the parallel processing module 2503-1 starts writing back the acquiredprevious packet arrival time “2022” and the calculated stored tokenvalue “160” to the computation result storage table 2214 (table WR).This corresponds to S1821 in FIG. 18B.

Since updating the computation result storage table 2214 requires acertain time, the acquired previous packet arrival time “2022” and thecalculated stored token value “160” are reflected to the computationresult storage table 2214 at T2018.

Meanwhile, in the table WR for the second packet, the parallelprocessing module 2503-1 internally holds the calculated stored tokenvalue “160” as a previous stored token value 2003 for successiveprocessing of the next incoming packet. This corresponds to S1822 inFIG. 18B.

Just as the second packet is a packet received before the completion ofthe table updating for the first packet, the third packet is a packetreceived by the parallel processing assignment module 501 beforecompletion of the table updating for the second packet. For this reason,the table updating for the third packet is the same as the tableupdating for the second packet.

However, the periodically added token value 2702 in FIG. 20 is updatedby the administrator between T2012 and T2013 when the table updating forthe third packet is started. Specifically, the value stored in theperiodically added token value 2702 is updated from “10” to “30”.Accordingly, the value acquired for the periodically added token value2702 by the parallel processing module 2503-1 in the dummy RD startingat T2013 is “30”.

In the table WR starting at T2017, the parallel processing module 2503-1holds “140”{=(2024−2022)×30+160−80} for the previous stored token value2003. After T2019 when the table updating for the third packet ends, thecomputation result storage table 2214 holds “2024” for the previouspacket arrival time 2802 and “140” for the stored token value 2803.

In the foregoing processing, the parallel processing module 2503-1 afterT2014 holds the previous table update time 2002 and the previous storedtoken value 2003 obtained by the table updating for the first packet;accordingly, the parallel processing module 2503-1 can take over theprevious table update time 2002 and the previous stored token value 2003in the data computation in the table updating for the second packet. Theparallel processing module 2503-1 after T2015 holds the previous tableupdate time 2002 and the previous stored token value 2003 obtained bythe table updating for the second packet; accordingly, the parallelprocessing module 2503-1 can take over the previous table update time2002 and the previous stored token value 2003 in the data computation inthe table updating for the third packet.

According to Embodiment 2 described above, like the effect of theEmbodiment 1, the parallel processing module 503 in Embodiment 2 doesnot need to access the computation result storage table 2214 at everytable updating and can successively perform table updating for thebandwidth control function.

Furthermore, the less access to the computation result storage table2214 can save the power consumption in the packet communicationapparatus.

Embodiment 2 provides more reliable bandwidth control since tableupdating utilizing the token bucket algorithm enables the outputdetermination module 504 to convert incoming packets in accordance withthe result of the table updating.

Embodiment 3

Hereinafter, Embodiment 3 is described with reference to FIGS. 21 to 25.

In Embodiment 3, this invention is applied to a statistical countingfunction. In Embodiment 3, the statistical counting function countsreceived packets and received bytes for statistical information.

FIG. 21 is a block diagram illustrating a physical configuration of thepacket communication apparatus 32 in Embodiment 3 and a logic device3210 in the apparatus 32.

The packet communication apparatus 32 in Embodiment 3 has the samephysical configuration as that of the packet communication apparatus 2in Embodiment 1 shown in FIG. 2. Specifically, the packet communicationapparatus 32 includes a plurality of network interface boards (NIFs) 200(200-1 to 200-M) and a switch unit 206 like the packet communicationapparatus 2 shown in FIG. 2. Each NIF 200 in Embodiment 3 also includesan input/output communication interface 201, a SW interface 205, and anNIF manager 211 like the NIF 200 in Embodiment 1.

However, the NIF 200 in Embodiment 3 includes a logic device 3210instead of the logic device 210 in Embodiment 1. The difference betweenthe logic device 3210 and the logic device 210 is that the memory in thelogic device 3210 does not hold the setting table 213, the incomingpacket buffer 204, and the outgoing packet buffer 209 but holds astatistical information table 3213.

The incoming packet controller 3203 and the outgoing packet controller3208 in the logic device 3210 perform processing differently from theincoming packet controller 203 and the outgoing packet controller 208 inthe logic device 210.

The setting register 3212 in the logic device 3210 has a storage areafor transitorily storing data and is connected with all the processingmodules in the logic device 3210 like the setting register 212 inEmbodiment 1. However, the setting register 3212 stores data differentfrom the data stored by the setting register 212 because of theprocessing of the incoming packet controller 3203. The followingdescription omits explanation of the processing of the setting register3212.

The incoming header processing module 202 and the outgoing headerprocessing module 207 in Embodiment 3 are the same as the incomingheader processing module 202 and the outgoing header processing module207 in Embodiment 1.

The statistical information table 3213 corresponds to the computationtable 214 in Embodiment 1 and stores results of table updating performedin the incoming packet controller 3203. Embodiment 3 is an embodiment inthe case where the communication apparatus in this embodiment does notuse the setting table 213 in Embodiment 1.

When the incoming packet controller 3203 receives an incoming packetfrom the incoming header processing module 202, it processes the packetusing the statistical information table 3213, namely, performsstatistical counting. The incoming packet controller 3203 does not storethe packet in the incoming packet buffer but sends the packet to the SWinterface 205 simultaneously with the statistical counting.

FIG. 22 is a block diagram illustrating a logical configuration of theincoming packet controller 3203 in Embodiment 3.

The incoming packet controller 3203 has the same configuration as thatof the incoming packet controller 203 shown in FIG. 5. The differencebetween the incoming packet controller 3203 and the incoming packetcontroller 203 in Embodiment 1 is that the incoming packet controller3203 includes a plurality of parallel processing modules 3503 (3503-1 to3503-N) and an access coordination module 3505 and does not include anoutput determination module and an incoming packet buffer. The parallelprocessing modules 3503 and the access coordination module 3505 performprocessing differently from the parallel processing modules 503 and theaccess coordination module 505.

The used flow management list 502 in Embodiment 3 is also different fromthe used flow management list 502 in Embodiment 1 in the point that theparallel processing modules 601 in the used flow management list 502represent the parallel processing modules 3503-1 to 3503-N.

The parallel processing assignment module 501 in Embodiment 3 performsthe same processing assignment 5950 as the processing of the parallelprocessing assignment module 501 in Embodiment 1. However, when theparallel processing assignment module 501 in Embodiment 3 receives anincoming packet, it starts processing assignment S950 and also sends thereceived incoming packet to the SW interface 205.

Each parallel processing module 3503 performs later-described tableupdating S2450 and updates information on a flow included in thestatistical information table 3213.

Like in Embodiment 1, the time required for table updating S2450 by theparallel processing module 3503 is predetermined in Embodiment 3. Stilllike in Embodiment 1, the number N of the parallel processing modules3503 is predetermined based on the table update time length and theshortest packet arrival interval.

The access coordination module 3505 coordinates the accesses (retrievalsand write-backs) from the parallel processing modules 3503 to thestatistical information table 3213, like the access coordination module505 in Embodiment 1.

FIG. 23 is an explanatory diagram illustrating the statisticalinformation table 3213 in Embodiment 3.

The statistical information table 3213 is a table including informationon the packets received by the packet communication apparatus 32. Thestatistical information table 3213 includes columns of flow IDs 3701,the numbers of received packets 3702, and the numbers of received bytes3703.

Each flow ID 3701 includes a flow ID of incoming packets. Each number ofreceived packets 3702 includes the number of incoming packets receivedby the parallel processing assignment module 501. Each number ofreceived bytes 3703 indicates the total number of bytes of the incomingpackets received by the parallel processing assignment module 501.

Hereinafter, described is table updating S2450 performed by one of theparallel processing modules 3503-1 to 3503-N.

FIG. 24 is a flowchart illustrating the table updating S2450 performedby the parallel processing module 3503 in Embodiment 3.

Upon receipt of a notice of assignment including a processing starttrigger from the parallel processing assignment module 501 (S2400), theparallel processing module 3503 acquires the new/successive parameter,the flow ID, and the frame length included in the notice of assignment(S2401).

After S2401, the parallel processing module 3503 determines whether thenew/successive parameter is “0”, namely, whether the new/successiveparameter indicates “new” (S2402).

If the new/successive parameter is “0”, meaning if it is determined thatthe new/successive parameter indicates “new” at S2402, the parallelprocessing module 3503 searches the statistical information table 3213with a search key of the flow ID acquired at S2401, namely, the flow IDof the incoming packet. As a result of the search, the parallelprocessing module 3503 acquires the number of received packets 3702 andthe number of received bytes 3703 (S2403). After S2403, the parallelprocessing module 3503 proceeds to S2405.

If, at S2402, the new/successive parameter is not “0”, meaning if it isdetermined that the new/successive parameter indicates “successive”, theparallel processing module 3503 acquires the previous number of receivedpackets and the previous number of received bytes internally held forsuccessive processing by the parallel processing module 3503 (S2404).After S2404, the parallel processing module 3503 proceeds to S2405.

After S2403 or S2404, the parallel processing module 3503 adds “1” tothe number of received packets (the number of received packets 3702acquired at S2403 or the previous number of received packets acquired atS2404). Then, the parallel processing module 3503 acquires the result ofthe addition as the updated number of received packets.

Furthermore, the parallel processing module 3503 adds the number ofbytes corresponding to the frame length acquired at S2401 to the numberof received bytes (the number of received bytes 3703 acquired at S2403or the previous number of received bytes acquired at S2404). Then, theparallel processing module 3503 acquires the result of the addition asthe updated number of received bytes (S2405).

After S2405, the parallel processing module 3503 writes back the updatednumber of received packets to the number of received packets 3702 in thestatistical information table 3213 and writes back the updated number ofreceived bytes to the number of received bytes 3703 in the statisticalinformation table 3213.

The parallel processing module 3503 internally holds the updated numberof received packets and the updated number of received bytes acquired atS2405 as a previous number of received packets and a previous number ofreceived bytes for successive processing of the next incoming packet(S2406). After S2406, the parallel processing module 3503 terminates thetable updating S2450 (S2407).

FIG. 25 is an explanatory diagram illustrating transitions of the numberof received packets and the number of received bytes caused by the tableupdating performed by the parallel processing module 3503 in Embodiment3.

Assuming that the table update time length is 10 clks and the shortestpacket arrival interval is 2 clks, FIG. 25 illustrates an example thatthe parallel processing module 3503-1 successively receives incomingpackets of the same flow ID “100” at 2-clk intervals. In FIG. 25, theframe lengths of the incoming packets are 80.

The first packet is an incoming packet on which the parallel processingassignment module 501 has determined at S904 that the parallelprocessing module 3503-1 is to newly perform table updating.

When the parallel processing module 3503-1 in Embodiment 3 receives anotice of assignment including a new/successive parameter indicating“new”, the flow ID of the first packet, the frame length of the firstpacket, and a processing start trigger from the parallel processingassignment module 501 (T2511), the parallel processing module 3503-1starts searching the statistical information table 3213 with a searchkey of the flow ID of the first packet. As a result of the search, theparallel processing module 3503-1 acquires the number of receivedpackets 3702 and the number of received bytes 3703 associated with theflow ID of the first packet (table RD).

The table RD for the first packet corresponds to S2400 to S2403 in FIG.24. The values acquired in the table RD for the first packet shown inFIG. 25 are “10” for the number of received packets 3702-1 and “1000”for the number of received bytes 3703-1.

The parallel processing module 3503-1 adds “1” to the acquired value“10” for the number of received packets and adds “80” of the framelength of the first packet to the retrieved value “1000” for the numberof received bytes. Then, the parallel processing module 3503-1 acquiresresults of the additions “11” and “1080” for the updated number ofreceived packets and the updated number of received bytes (datacomputation).

When the data computation is completed (T2514), the parallel processingmodule 3503-1 starts writing back “11” of the updated number of receivedpackets and “1080” of the updated number of received bytes to thestatistical information table 3213 (table WR). The table WR for thefirst packet corresponds to S2405.

Since accessing a table requires some time, the value “11” of theupdated number of received packets and the value “1080” of the updatednumber of received bytes are reflected to the statistical informationtable 3213 at T2516.

Meanwhile, the parallel processing module 3503-1 internally holds thevalue “11” of the updated number of received packets and the value“1080” of the updated number of received bytes as a previous number ofreceived packets 3512 and a previous number of received bytes 3513 forsuccessive processing of the next incoming packet. The processing ofinternally holding the updated number of received packets “11” and theupdated number of received bytes “1080” corresponds to S2406.

The second packet is received by the parallel processing assignmentmodule 501 before completion of the table updating for the first packet.The parallel processing assignment module 501 determines that theparallel processing module 3503-1 is to successively perform tableupdating for the second packet.

When the parallel processing module 3503-1 receives a notice ofassignment including a new/successive parameter indicating “successive”,the flow ID of the second packet, the flow length of the second packet,and a processing start trigger from the parallel processing assignmentmodule 501 (T2512), the table WR in the table updating for the firstpacket has not been completed. Accordingly, the parallel processingmodule 3503-1 does not access the statistical information table 3213.

For this reason, table RD or dummy RD is not performed in the tableupdating for the second packet in Embodiment 3.

After T2514, the parallel processing module 3503-1 takes over the value“11” of the previous number of received packets 3512 and the value“1080” of the previous number of received bytes 3513 internally held inthe table updating for the first packet to start data computation forthe second packet. The processing until T2514 corresponds to S2400 toS2402 and S2404 shown in FIG. 24.

It should be noted that the parallel processing module 3503-1 performsdata computation after the takeover of the previous number of receivedpackets 3512 and the previous number of received bytes 3513 within 2clks since the packet arrival interval is 2 clks. If the parallelprocessing module 3503-1 needs a time longer than the packet arrivalinterval to complete the data computation, the parallel processingassignment module 501 may discard an incoming packet.

In the data computation for the second packet, the parallel processingmodule 3503-1 adds “1” to the value “11” of the taken over previousnumber of received packets 3512 and adds “80” of the frame length to thevalue “1080” of the taken over previous number of received bytes 3513.The parallel processing module 3503-1 obtains the result of the addition“12” as the updated number of received packets and the result of theaddition “1160” as the updated number of received bytes.

When the data computation is completed at T2515, the parallel processingmodule 3503-1 starts writing back the updated number of received packets“12” and the updated number of received bytes “1160” to the statisticalinformation table 3213 (table WR). The table WR starting at T2515corresponds to S2405 in FIG. 24.

Since accessing the table requires some time, the value “12” of theupdated number of received packets and the value “1160” of the updatednumber of received bytes are reflected to the statistical informationtable 3213 at T2518.

Meanwhile, in the table WR starting at T2515, the parallel processingmodule 3503-1 internally holds the updated number of received packets“12” and the updated number of received bytes “1160” as a previousnumber of received packets 3512 and a previous number of received bytes3513 for successive processing of the next incoming packet. Thisprocessing of internally holding the updated number of received packets“12” and the updated number of received bytes “1160” corresponds toS2406 in FIG. 24.

Like the second packet in Embodiment 1 or Embodiment 2, the third packetin Embodiment 3 is received by the parallel processing assignment module501 before completion of the table updating for the second packet;accordingly, the table updating for the third packet is the same as thetable updating for the second packet.

In the table WR starting at T2517, the parallel processing module 3503-1holds “13” for the previous number of received packets 3512 and “1240”for the previous number of received bytes 3513. After T2519 when thetable updating for the third packet ends, the number of received packets3702-1 stores “13” and the number of received bytes 3703-1 stores“1240”.

According to Embodiment 3 described above, like the effect of theEmbodiment 1, the packet communication apparatus 32 holds a previouscomputation result in each parallel processing module 3503 and uses thecomputation result to perform data computation for successively receivedincoming packets. Hence, the parallel processing module 3503 inEmbodiment 3 does not need to access the statistical information table3213 at every table updating and can successively perform table updatingfor the packet management function.

Furthermore, the less access to the statistical information table 3213can save the power consumption of the packet communication apparatus.

It should be noted that the parallel processing module in the foregoingembodiments may perform processing differently depending on the value ofthe new/successive parameter. Specifically, in S1102 to S1106 shown inFIG. 11, S1802 to S1812 shown in FIG. 18A, and S2402 to S2404 shown inFIG. 24, the parallel processing module may perform processingdifferently as predetermined by the user depending on whether thenew/successive parameter indicates “new” or “successive”.

Through this approach, the parallel processing module in the embodimentscan obtain different values for computation results to be updated asrequested by the user in the cases where incoming packets are receivedsuccessively and incoming packets are not received successively.

This invention is not limited to the above-described embodiments butincludes various modifications. The above-described embodiments areexplained in details for better understanding of this invention and arenot limited to those including all the configurations described above. Apart of the configuration of one embodiment may be replaced with that ofanother embodiment; the configuration of one embodiment may beincorporated to the configuration of another embodiment. A part of theconfiguration of each embodiment may be added, deleted, or replaced bythat of a different configuration.

The above-described configurations, functions, and processors, for allor a part of them, may be implemented by hardware: for example, bydesigning an integrated circuit. The above-described configurations andfunctions may be implemented by software, which means that a processorinterprets and executes programs providing the functions. Theinformation of programs, tables, and files to implement the functionsmay be stored in a storage device such as a memory, a hard disk drive,or an SSD (Solid State Drive), or a storage medium such as an IC card,or an SD card.

What is claimed is:
 1. A communication apparatus connected with anetwork, the communication apparatus comprising: an input interface forreceiving packets sent from the network; a plurality of parallelprocessing modules for executing processing for the packets; a parallelprocessing assignment module for assigning the processing for thepackets to the parallel processing modules on a packet-by-packet basis;and a computation table including values indicating results of executionof the processing for the packets and flow IDs assigned to the packets,wherein each of the parallel processing module holds a result ofexecution of processing for a packet performed by the parallelprocessing module, wherein the parallel processing assignment moduleholds a used flow management list including the flow IDs assigned to thepackets for which the parallel processing modules execute processing andvalues indicating statuses of the processing for the packets in theparallel processing modules, wherein, upon receipt of a first packet,the parallel processing assignment module determines whether processingfor a second packet assigned the flow ID associated with the firstpacket is being executed based on the used flow management list and aflow ID assigned to the first packet, wherein the parallel processingassignment module determines a parallel processing module to executeprocessing for the first packet and a parameter to be included in anotice of assignment to be sent to the determined parallel processingmodule in accordance with the result of the determination, wherein theparallel processing assignment module includes information about thefirst packet in the notice of assignment to send the notice ofassignment to the determined parallel processing module, wherein thedetermined parallel processing module acquires, upon receipt of thenotice of assignment, a result of execution of the processing for thesecond packet from either one of the computation table and the result ofexecution of the processing held in the parallel processing module inaccordance with the received notice of assignment, wherein thedetermined parallel processing module executes the processing for thefirst packet using the acquired result of execution of the processingfor the second packet and the information included in the notice ofassignment, and wherein the determined parallel processing moduleupdates the computation table with a result of execution of theprocessing for the first packet.
 2. The communication apparatusaccording to claim 1, wherein each of the values indicating statuses ofthe processing included in the used flow management list is a valueindicating a time of execution that has passed since the parallelprocessing module started the processing for a packet, wherein theparallel processing assignment module acquires, upon receipt of thefirst packet, a flow ID assigned to the first packet and a valueindicating the time of execution that has passed since a parallelprocessing module for executing the processing for the second packetstarted the processing for the second packet from the used flowmanagement list, wherein the parallel processing assignment moduledetermines whether the processing for the second packet is beingexecuted based on the acquired value indicating the time of execution,wherein, in a case where a result of the determination indicates thatthe processing for the second packet is being executed, the parallelprocessing assignment module determines that the parallel processingmodule executing the processing for the second packet is to execute theprocessing for the first packet and further determines the parameter tobe a value indicating successive processing, and wherein, in a casewhere the received notice of assignment includes the parameterindicating successive processing, the determined parallel processingmodule acquires the result of execution of the processing for the secondpacket from the result of execution of the processing for a packet heldin the parallel processing module.
 3. The communication apparatusaccording to claim 1, further comprising a setting table includingpredetermined setting values to be used in the processing for thepackets and flow IDs assigned to the packets, wherein the informationabout the first packet included in the notice of assignment includes theflow ID assigned to the first packet, wherein the determined parallelprocessing module retrieves, upon receipt of the notice of assignment, apredetermined setting value to be used in the processing for the firstpacket from the setting table in accordance with the received notice ofassignment, and wherein the determined parallel processing moduleexecutes the processing for the first packet using the acquired resultof execution of the processing for the second packet, the acquiredinformation about the first packet included in the notice of assignment,and the retrieved predetermined setting value.
 4. The communicationapparatus according to claim 3, wherein each of the predeterminedsetting values included in the setting table includes an amount of tokento be added per unit time to a token bucket associated with a flow IDand a maximum amount of token to be accumulated in the token bucket,wherein each of the results of execution of the processing for thepackets includes an amount of token accumulated in the token bucket anda latest time when the amount of token accumulated in the token bucketwas calculated, wherein the information about the first packet includedin the notice of assignment includes a frame length of the first packet,wherein, in a case where the determined parallel processing moduledetermines, through the execution of the processing for the firstpacket, that an amount of token accumulated in the token bucket beforereceipt of the first packet is less than the amount of tokencorresponding to the frame length of the first packet, the determinedparallel processing module outputs information indicating thattransmission of the first packet is out of guarantee, and wherein, in acase where the determined parallel processing module determines, throughthe execution of the processing for the first packet, that an amount oftoken accumulated in the token bucket before receipt of the first packetis equal to or more than the amount of token corresponding to the framelength of the first packet, the determined parallel processing moduleoutputs information indicating that transmission of the first packet isunder guarantee.
 5. The communication apparatus according to claim 3,further comprising: a packet buffer for holding the packets received viathe input interface; and an output determination module for rewritingheaders of the packets, wherein, upon receipt of the first packet, theparallel processing assignment module stores the first packet in thepacket buffer, wherein the determined parallel processing module sendsthe output determination module an instruction to rewrite a header ofthe first packet in accordance with the result of execution of theprocessing for the first packet, wherein the output determination moduleacquires the first packet from the packet buffer in accordance with theinstruction to rewrite the header of the first packet, and wherein theoutput determination module rewrites the header of the acquired firstpacket.
 6. The communication apparatus according to claim 1, wherein theinformation about the first packet included in the notice of assignmentincludes a frame length of the first packet, wherein each of the resultsof execution of the processing for the packets includes the number ofpackets received by the communication apparatus and the number of bytesof the packets received by the communication apparatus, and wherein thedetermined parallel processing module executes the processing for thefirst packet by referring to the acquired result of execution of theprocessing for the second packet and the information included in thenotice of assignment, adding 1 to the number of packets indicated by theresult of execution of the processing for the second packet, and addinga frame length of the first packet to the number of bytes indicated bythe result of execution of the processing for the second packet.
 7. Thecommunication apparatus according to claim 1, wherein each of theparallel processing modules holds processing methods depending on valuesindicated by the parameter, and wherein the determined parallelprocessing module executes the processing for the first packet by one ofthe methods in accordance with the value indicated by the parameterusing the acquired result of execution of the processing for the secondpacket and the acquired information included in the notice ofassignment.
 8. A communication method performed by a communicationapparatus connected with a network, the communication apparatusincluding: an input interface for receiving packets sent from thenetwork; a plurality of parallel processing modules for executingprocessing for the packets; a parallel processing assignment module forassigning the processing for the packets to the parallel processingmodules on a packet-by-packet basis; and a computation table includingvalues indicating results of execution of the processing for the packetsand flow IDs assigned to the packets, each of the parallel processingmodule holding a result of execution of the processing for a packetperformed by the parallel processing module, the parallel processingassignment module holding a used flow management list including the flowIDs assigned to the packets for which the parallel processing modulesexecute the processing and values indicating statuses of the processingfor the packets in the parallel processing modules, and thecommunication method comprising: determining, by the parallel processingassignment module that has received a first packet, whether processingfor a second packet assigned the flow ID associated with the firstpacket is being executed based on the used flow management list and aflow ID assigned to the first packet; determining, by the parallelprocessing assignment module, a parallel processing module to executeprocessing for the first packet and a parameter to be included in anotice of assignment to be sent to the determined parallel processingmodule in accordance with the result of the determination; including, bythe parallel processing assignment module, information about the firstpacket in the notice of assignment to send the notice of assignment tothe determined parallel processing module; acquiring, by the determinedparallel processing module that has received the notice of assignment, aresult of execution of the processing for the second packet from eitherone of the computation table and the result of execution of theprocessing held in the parallel processing module in accordance with thereceived notice of assignment, executing, by the determined parallelprocessing module, the processing for the first packet using theacquired result of execution of the processing for the second packet andthe information included in the notice of assignment; and updating, bythe determined parallel processing module, the computation table withthe result of execution of the processing for the first packet.
 9. Thecommunication method according to claim 8, wherein each of the valuesindicating statuses of the processing included in the used flowmanagement list is a value indicating a time of execution that haspassed since the parallel processing module started the processing for apacket, wherein the communication method further comprises: acquiring,by the parallel processing assignment module that has received the firstpacket, a flow ID assigned to the first packet and a value indicatingthe time of execution that has passed since a parallel processing modulefor executing the processing for the second packet started theprocessing for the second packet from the used flow management list;determining, by the parallel processing assignment module, whether theprocessing for the second packet is being executed based on the acquiredvalue indicating the time of execution; determining, by the parallelprocessing assignment module, that the parallel processing moduleexecuting the processing for the second packet is to execute theprocessing for the first packet and further determining the parameter tobe a value indicating successive processing, in a case where a result ofthe determination indicates that the processing for the second packet isbeing executed; and acquiring, by the determined parallel processingmodule, a result of execution of the processing for the second packetfrom the result of execution of the processing for a packet held in theparallel processing module, in a case where the received notice ofassignment includes the parameter indicating successive processing. 10.The communication method according to claim 8, wherein the communicationapparatus further includes a setting table including predeterminedsetting values to be used in the processing for the packets and flow IDsassigned to the packets, wherein the information about the first packetincluded in the notice of assignment includes a flow ID assigned to thefirst packet, and wherein the communication method further comprises:retrieving, by the determined parallel processing module that hasreceived the notice of assignment, a predetermined setting value to beused in the processing for the first packet from the setting table inaccordance with the received notice of assignment; and executing, by thedetermined parallel processing module, the processing for the firstpacket using the acquired result of execution of the processing for thesecond packet, the acquired information about the first packet includedin the notice of assignment, and the retrieved predetermined settingvalue.
 11. The communication method according to claim 10, wherein eachof the predetermined setting values included in the setting tableincludes an amount of token to be added per unit time to a token bucketassociated with a flow ID and a maximum amount of token to beaccumulated in the token bucket, wherein each of the results ofexecution of the processing for the packets includes an amount of tokenaccumulated in the token bucket and a latest time when the amount oftoken accumulated in the token bucket was calculated, wherein theinformation about the first packet included in the notice of assignmentincludes a frame length of the first packet, and wherein thecommunication method further comprises: outputting, by the determinedparallel processing module, information indicating that transmission ofthe first packet is out of guarantee, in a case where the determinedparallel processing module determines, through the execution of theprocessing for the first packet, that an amount of token accumulated inthe token bucket before receipt of the first packet is less than theamount of token corresponding to the frame length of the first packet;and outputting, by the determined parallel processing module,information indicating that transmission of the first packet is underguarantee, in a case where the determined parallel processing moduledetermines, through the execution of the processing for the firstpacket, that an amount of token accumulated in the token bucket beforereceipt of the first packet is equal to or more than the amount of tokencorresponding to the frame length of the first packet.
 12. Thecommunication method according to claim 10, wherein the communicationapparatus further includes: a packet buffer for holding the packetsreceived via the input interface; and an output determination module forrewriting headers of the packets, and wherein the communication methodfurther comprises: storing, by the parallel processing assignment modulethat has received the first packet, the first packet in the packetbuffer; sending, by the determined parallel processing module, theoutput determination module an instruction to rewrite a header of thefirst packet in accordance with the result of execution of theprocessing for the first packet; acquiring, by the output determinationmodule, the first packet from the packet buffer in accordance with theinstruction to rewrite the header of the first packet; and rewriting, bythe output determination module, the header of the acquired firstpacket.
 13. The communication method according to claim 8, wherein theinformation about the first packet included in the notice of assignmentincludes a frame length of the first packet, wherein each of the resultsof execution of the processing for the packets includes the number ofpackets received by the communication apparatus and the number of bytesof the packets received by the communication apparatus, and wherein thecommunication method further comprises: executing, by the determinedparallel processing module, the processing for the first packet byreferring to the acquired result of execution of the processing for thesecond packet and the information included in the notice of assignment,adding 1 to the number of packets indicated by the result of executionfor the second packet, and adding a frame length of the first packet tothe number of bytes indicated by the result of execution of theprocessing for the second packet.
 14. The communication method accordingto claim 8, wherein each of the parallel processing modules holdsprocessing methods depending on values indicated by the parameter, andwherein the communication method further comprises: executing, by thedetermined parallel processing module, the processing for the firstpacket by one of the methods in accordance with the value indicated bythe parameter using the acquired result of execution of the processingfor the second packet and the acquired information included in thenotice of assignment.